// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_CUSTOMER_ACCOUNT_ITEM
// * CreateDate    : 2014-06-05 18:29:48
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:48
// * LastChanger   : 2014-06-05 18:29:48
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class FinCustomerAccountItemEntity : EntityBase
    {
        public FinCustomerAccountItemTable TableSchema
        {
            get
            {
                return FinCustomerAccountItemTable.Current;
            }
		}
		
		public FinCustomerAccountItemEntity()
        {

        }
		
		public FinCustomerAccountItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CustomerAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ITEM_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
			this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
			this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
			this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
			this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
        }
		
		public FinCustomerAccountItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CustomerAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ITEM_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
			this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
			this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
			this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
			this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinCustomerAccountItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string CustomerAccountItemId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_CUSTOMER_ACCOUNT_ITEM_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_CUSTOMER_ACCOUNT_ITEM_ID, value); }
        }
		
        [DataMember]
        public string CustomerId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_CUSTOMER_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_CUSTOMER_ID, value); }
        }
		
        [DataMember]
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_APPLICATION_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_APPLICATION_ID, value); }
        }
		
        [DataMember]
        public DateTime AmountDate
        {
            get { return Convert.ToDateTime(GetData(FinCustomerAccountItemTable.C_AMOUNT_DATE)); }
            set { SetData(FinCustomerAccountItemTable.C_AMOUNT_DATE, value); }
        }
		
        [DataMember]
        public string AmountPerson
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_AMOUNT_PERSON)); }
            set { SetData(FinCustomerAccountItemTable.C_AMOUNT_PERSON, value); }
        }
		
        [DataMember]
        public decimal SalesOrderAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_SALES_ORDER_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_SALES_ORDER_AMOUNT, value); }
        }
		
        [DataMember]
        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_BILLING_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_BILLING_AMOUNT, value); }
        }
		
        [DataMember]
        public decimal ReceivedAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_RECEIVED_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_RECEIVED_AMOUNT, value); }
        }
		
        [DataMember]
        public decimal ReceivableAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_RECEIVABLE_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_RECEIVABLE_AMOUNT, value); }
        }
		
        [DataMember]
        public decimal DeliveryAmountNoBilling
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_NO_BILLING)); }
            set { SetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_NO_BILLING, value); }
        }
		
        [DataMember]
        public decimal DeliveryAmountBilled
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_BILLED)); }
            set { SetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_BILLED, value); }
        }
		
        [DataMember]
        public decimal SalesAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_SALES_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_SALES_AMOUNT, value); }
        }
		
        [DataMember]
        public string RelatedOrderId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_RELATED_ORDER_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_RELATED_ORDER_ID, value); }
        }
		
        [DataMember]
        public string RelatedOrderCode
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_RELATED_ORDER_CODE)); }
            set { SetData(FinCustomerAccountItemTable.C_RELATED_ORDER_CODE, value); }
        }
		
		#endregion
	}
	
	
}	

